﻿<%@ Page Language="C#" MasterPageFile="~/Manager.master" AutoEventWireup="true" CodeFile="DistributionCompany.aspx.cs"
    Inherits="Manager_DistributionCompany_DistributionCompany" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div align="center">
        <table border="1" bordercolor="#407db3" cellpadding="2" cellspacing="2" class="tbl_Comon-Search"
            style="border-collapse: collapse" width="100%">
            <tr>
                <td align="center" colspan="1" rowspan="1" style="width: 1%" valign="top">
                    <asp:Button ID="btnSearch" runat="server" CssClass="cssButton" Text="Tìm kiếm" OnClick="btnSearch_Click1" /></td>
                <td class="td_Title" nowrap="nowrap" style="width: 5%">
                    <asp:Label ID="Label3" runat="server" CssClass="lbl_Common-Search" Text="Tên"></asp:Label></td>
                <td class="td_Control" nowrap="nowrap" style="width: 30%">
                    <asp:TextBox ID="txtName" runat="server" Width="98%"></asp:TextBox></td>
                <td class="td_Title" nowrap="nowrap" style="width: 5%">
                    <asp:Label ID="Label5" runat="server" CssClass="lbl_Common-Search" Text="Email"></asp:Label></td>
                <td align="left" style="width: 30%">
                    <asp:TextBox ID="txtEmail" runat="server" Width="98%"></asp:TextBox></td>
            </tr>
            <tr>
                <td align="center" colspan="1" rowspan="1" style="width: 84px" valign="top">
                </td>
                <td class="td_Title" nowrap="nowrap" style="width: 1%; white-space: nowrap">
                    <asp:Label ID="Label4" runat="server" CssClass="lbl_Common-Search" Text="Điện thoại"></asp:Label></td>
                <td class="td_Control" nowrap="nowrap">
                    <asp:TextBox ID="txtPhone" runat="server" Width="98%"></asp:TextBox></td>
                <td class="td_Title" nowrap="nowrap" style="width: 57px">
                    <asp:Label ID="Label2" runat="server" CssClass="lbl_Common-Search" Text="Địa chỉ"></asp:Label></td>
                <td align="left">
                    <asp:TextBox ID="txtAddress" runat="server" Width="98%"></asp:TextBox></td>
            </tr>
            <tr>
                <td align="left" colspan="5" rowspan="1" valign="top">
                    <asp:Button ID="btnAdd_Catalogue" runat="server" CssClass="cssButton" Text="Thêm mới"
                        OnClick="btnAdd_Catalogue_Click" /></td>
            </tr>
        </table>
        <br />
    </div>
    <div align="center">
        <asp:GridView ID="grv_Master" runat="server" AllowPaging="True" AllowSorting="True"
            AutoGenerateColumns="False" DataKeyNames="DisCompID" Width="100%" CellPadding="2"
            BorderColor="#407db3" OnRowDataBound="grv_Master_RowDataBound" OnRowDeleting="grv_Master_RowDeleting"
            PageSize="20" OnPageIndexChanging="grv_Master_PageIndexChanging">
            <Columns>
                <asp:TemplateField>
                    <ItemTemplate>
                        <img src='../../Images/Icon/cmdEdit.gif' border="0" alt="Edit" style="cursor: pointer"
                            onclick='hrUpdateCatalogue(this,<%# Eval("DisCompID") %>)' />
                    </ItemTemplate>
                    <ItemStyle CssClass="cssBorderGrv" HorizontalAlign="Center" Width="1%" />
                    <HeaderStyle CssClass="cssBorderGrv" />
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:LinkButton ID="lblDelete" runat="server" CommandName="delete" Text="<img src=../../Images/Icon/cmdDelete.gif border=0 alt=Delete > "></asp:LinkButton>
                    </ItemTemplate>
                    <ItemStyle CssClass="cssBorderGrv" HorizontalAlign="Center" Width="1%" />
                    <HeaderStyle CssClass="cssBorderGrv" />
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        Tên
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("Name") %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle CssClass="cssBorderGrv" HorizontalAlign="Left" Width="35%" />
                    <HeaderStyle CssClass="cssBorderGrv" HorizontalAlign="Left" />
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        Điện thoại
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblLevelMenu11" runat="server" Text='<%# Eval("Phone") %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle CssClass="cssBorderGrv" HorizontalAlign="Left" Width="10%" />
                    <HeaderStyle CssClass="cssBorderGrv" HorizontalAlign="Left" />
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        Email
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblLevelMenu22" runat="server" Text='<%# Eval("Email") %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle CssClass="cssBorderGrv" HorizontalAlign="Left" Width="10%" />
                    <HeaderStyle CssClass="cssBorderGrv" HorizontalAlign="Left" />
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        Mã số thuế
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblLevelMenu33" runat="server" Text='<%# Eval("TaxNo") %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle CssClass="cssBorderGrv" HorizontalAlign="Left" Width="10%" />
                    <HeaderStyle CssClass="cssBorderGrv" HorizontalAlign="Left" />
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        Địa chỉ
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblLevelMenu44" runat="server" Text='<%# Eval("Address") %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle CssClass="cssBorderGrv" HorizontalAlign="Left" Width="10%" />
                    <HeaderStyle CssClass="cssBorderGrv" HorizontalAlign="Left" />
                </asp:TemplateField>
            </Columns>
            <RowStyle CssClass="gvRowStyle" />
            <AlternatingRowStyle CssClass="gvAlternatingRowStyle" />
            <HeaderStyle CssClass="gvHeader" />
            <PagerStyle HorizontalAlign="Left" />
        </asp:GridView>
        <input type="hidden" id="hidProperties" runat="server" />
        <input type="hidden" runat="server" id="hidMethod" />

        <script language="javascript" type="text/javascript">
  
            function hrUpdateCatalogue(obj,DisCompID)
            {

                var CodeID='<%= Request.QueryString["CodeID"]%>';
                window.location.href="AddDistributionCompany.aspx?DisCompID="+DisCompID+"&CodeID="+CodeID;
            }
           
           
        </script>
</asp:Content>
